#include "Tester.cuh"

__host__ __device__ void Tester::process_test(bool return_value, char* method_name)
{
	if(return_value)
	{
		printf("\tMethod \"%s\" is SUCCESSFUL\n", method_name);
	}
	else
	{
		printf("\tMethod \"%s\" FAILED\n", method_name);
		number_of_errors++;
	}
	number_of_tests++;
}

__host__ __device__ Tester::~Tester()
{

}

__host__ __device__ Tester::Tester()
{
	this->number_of_errors = 0;
	this->number_of_tests = 0;
}
__host__ __device__ int Tester::get_number_of_errors()
{
	return number_of_errors;
}
__host__ __device__ int Tester::get_number_of_tests()
{
	return number_of_tests;
}

__host__ __device__ void Tester::print_summary()
{
	if(number_of_errors != 0)
		printf("There were %d errors of %d\n", number_of_errors, number_of_tests);
}
